#ifndef __VIDEO_H__
#define __VIDEO_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "common_util.h"

#define CMD_UPDATETIME			0
#define CMD_ADAS					1
#define CMD_PHOTOEND				2

#define ISP_SP_WIDTH 640
#define ISP_SP_HEIGHT 480

void video_record_getfilename(char *str, unsigned short str_len,
                              const char *path, int ch, const char *filetype);

int video_record_addvideo(int id, struct ui_frame *front, char check_record_init);
int video_record_deletevideo(int deviceid);
void video_record_init(struct ui_frame *front,
                       bool withMp,
                       bool withSp);
void video_record_deinit(void);
int video_record_startrec(void);
void video_record_stoprec(void);
void video_record_stop_savecache();
void video_record_file_rename(char* oldpath,char* newpath);
void video_record_setaudio(int flag);
int video_record_set_power_line_frequency(int i);
int video_record_takephoto(void);
int video_record_takephoto_stronger(int is_return,char* result);

void video_record_start_cache(int sec);
void video_record_stop_cache();

void video_record_reset_bitrate();

/* default attach to the main video node, TODO... */
void video_record_start_ts_transfer(char *url);
void video_record_stop_ts_transfer(char sync);
int REC_RegEventCallback(void (*call)(int cmd, void *msg0, void *msg1));
int video_record_get_list_num(void);
void video_record_get_user_noise(void);
void video_record_init_lock();
void video_record_destroy_lock();
#ifdef __cplusplus
}
#endif

#endif
